package com.smile.service.entity.media;


import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;

@Data
public class StorageConfigGetData {

    @JsonProperty("output")
    private StorageOutput output;

    @JsonProperty("result")
    private int result;


    @Override
    public String toString() {
        return "StorageConfigGetData{" +
                "output=" + output +
                ", result=" + result +
                '}';
    }

    @Data
    public static class StorageOutput {

        @JsonProperty("bucket")
        private String bucket;

        @JsonProperty("credentials")
        private StorageCredentials credentials;

        @JsonProperty("endpoint")
        private String endpoint;

        @JsonProperty("object_key_prefix")
        private String objectKeyPrefix;

        @JsonProperty("provider")
        private String provider;

        @JsonProperty("region")
        private String region;


        @Override
        public String toString() {
            return "StorageOutput{" +
                    "bucket='" + bucket + '\'' +
                    ", credentials=" + credentials +
                    ", endpoint='" + endpoint + '\'' +
                    ", objectKeyPrefix='" + objectKeyPrefix + '\'' +
                    ", provider='" + provider + '\'' +
                    ", region='" + region + '\'' +
                    '}';
        }
    }

    // 存储凭证类
    @Data
    public static class StorageCredentials {

        @JsonProperty("access_key_id")
        private String accessKeyId;

        @JsonProperty("access_key_secret")
        private String accessKeySecret;

        @JsonProperty("expire")
        private Integer expire; // 凭证有效期（秒）

        @JsonProperty("security_token")
        private String securityToken;


    }

}

// 存储输出配置类
